"""
    https://leetcode.com/problems/two-sum/description/


"""



def twoSum(nums, target):
    """
    nums 中找出和为target的索引
    :param nums:
    :param target:
    :return:
    """
    for index in range(0, len(nums)):
        for index2 in range(index + 1, len(nums)):
            if target == (nums[index] + nums[index2]):
                return index, index2
    return None


if __name__ == '__main__':
    nums = [2, 7, 11, 15]
    target = 9
    index, index2 = twoSum(nums, target)
    print(index, index2)
